<div class="page-title">
	<div class="title-env">
		<h1 class="title">配置管理</h1>
		<p class="description"><i class="fa-question-circle"></i> 可以从这里了解<a href="#" target="_blank">配置管理?</a></p>
	</div>
	<div class="breadcrumb-env">

		<ol class="breadcrumb bc-1">
			<li>
				<a ui-sref="cp" ><i class="fa-home"></i>首页</a>
			</li>

			<li class="active">

				配置管理
			</li>
		</ol>

	</div>

</div>
<!-- Responsive Table -->
<div class="row">
	<div class="col-md-12">

		<div class="panel panel-default">

			<div class="panel-body" ng-controller="BuildInfosControler">



				<div class="row">


					<nav class="navbar navbar-default service_menu" >

						<div class="navbar-header">
							<button class="btn btn-blue" ng-click="createVolumn()">
								<i class="fa-plus"></i>
								<span>添加环境</span>
							</button>
						</div>
					</nav>
				</div>

				<table class="table table-bordered table-striped " >
					<thead>
					<tr>
						<!--<th class="no-sorting">
							<input type="checkbox" class="cbr">
						</th>-->
						<th class="width-60">构建名称</th>
						<th class="width-60">项目源码地址</th>
						<th>库</th><th class="width-60" >构建上下文</th>
						<th>类型</th>
						<!--<th>webhook</th>-->
						<th>操作</th>

					</tr>
					</thead>


					<tbody>
					<tr ng-repeat="buildInfo in currentPageBuilds">
						<!--<td width="30">
							<input type="checkbox" class="cbr">
						</td>-->
						<td><a ui-sref="cp.buildhistory({runID:buildInfo.id})">{{buildInfo.id}}</a></td>
						<td>{{buildInfo.gitPath}}</td>
						<td>{{buildInfo.id}}</td>
						<td>{{buildInfo.buildContext}}</td>
						<td style="text-align: center;">{{buildInfo.iconName}}<i ng-class="buildInfo.icon" ></i></td>
						<td class="table_btn">

							<a title="查看WebhookURL" href="#" ng-click="seeWebhook(buildInfo.id)">
								<i style="float: left;border-radius: 50%; background-color: #888888; color: white; width: 16px; height: 16px; line-height: 16px;font-size: 15px;padding-left: 2px">w</i>
							</a>
                            <a data-toggle="tooltip" data-placement="top" title="更新Dockerfile" href="#" ng-click="createDocker($event,buildInfo)">
                                <i style="float: left;border-radius: 50%; background-color: #888888; color: white; width: 16px; height: 16px; line-height: 16px;font-size: 14px;padding-left: 2px">D</i>
                            </a>
                            <a data-toggle="tooltip" data-placement="top" title="Dockerfile测试" href="#" ng-click="testDocker($event,buildInfo)">
                                <i style="float: left;border-radius: 50%; background-color: #888888; color: white; width: 16px; height: 16px; line-height: 16px;font-size: 14px;padding-left: 2px">T</i>
                            </a>
							<a  data-toggle="tooltip" data-placement="top" title="删除构建" href="#" ng-click="delete(buildInfo.id)">
								<i class="fa-times-circle"></i>
							</a>

							<a  data-toggle="tooltip" data-placement="top" title="更新构建" href="javascript:;" ng-click="update(buildInfo)">
								<i class="fa fa-pencil"></i>
							</a>

							<a  data-toggle="tooltip" data-placement="top" title="开始构建" href="#" ng-click="startBuild(buildInfo)">
								<i class="fa-play-circle"></i>
							</a>

					</tr>





					</tbody>
				</table>

				<div class="pull-right">
					<uib-pagination
							ng-model="currentPage"
							total-items="buildInfos.length"
							items-per-page="numPerPage"
							max-size="3"
							first-text="<<"
							previous-text="<"
							next-text=">"
							last-text=">>"
							boundary-links="true">
					</uib-pagination>
				</div>


			</div>

		</div>
	</div>
</div>

<!-- Modal 1 -->
<div class="modal fade" id="modal-1">
	<div class="modal-dialog">
		<div class="modal-content">

			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title">更新构建</h4>
			</div>

			<div class="modal-body">
				<div class="row">
					<div class="col-md-12">

						<div class="form-group">


							<label class="col-sm-3 control-label text-right" >构建：</label>
							<div class="col-sm-7">
								<input type="text" class="form-control"  placeholder="test">
							</div>
							<div class="clearfix"></div>

						</div>

					</div>

					<div class="col-md-12">

						<div class="form-group">


							<label class="col-sm-3 control-label text-right" >源码库地址：</label>
							<div class="col-sm-8">
								https://hjqi@bitbucket.org/hjqi/nodejs-sample.git
							</div>
							<div class="clearfix"></div>


						</div>

					</div>

					<div class="col-md-12">

						<div class="form-group">


							<label class="col-sm-3 control-label text-right" >填写库名称：</label>
							<div class="col-sm-7">
								<input type="text" class="form-control"  placeholder="nodejs-sample">
							</div>
							<div class="clearfix"></div>

						</div>

					</div>

					<div class="col-md-12">

						<div class="form-group">


							<label class="col-sm-3 control-label text-right" >填写上下文：</label>
							<div class="col-sm-7">
								<input type="text" class="form-control"  placeholder="nodejs-sample">
							</div>
							<div class="clearfix"></div>

						</div>

					</div>

				</div>



			</div>

			<div class="modal-footer">
				<button type="button" class="btn btn-white" data-dismiss="modal">取 消</button>
				<button type="button" class="btn btn-info">确 定</button>
			</div>
		</div>
	</div>
</div>